package com.demo.springmvc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.demo.springmvc.model.User;

@Controller("/request2MapBean")
public class Request2MapBeanController {

	@RequestMapping("/test")
	public ModelAndView test(ModelAndView modelAndView, User user) {
		System.out.println("user:" + user);
		System.err.println("自定义参数：" + user.getString("cc"));
		// 直接返回视图页面
		modelAndView.setViewName("success");
		return modelAndView;
	}

}
